package TestSystemClient;

import java.awt.*;
import java.net.*;
import javax.swing.*;
import javax.swing.UIManager.*;

import TestSystemUtil.ClientUtil;

public class Client {
	public static String messageToServer = null, messageFromServer = null;
	public Socket connection;
	public ClientUtil util = new ClientUtil();
	
	public Client() {
		connection = util.connectToServer();
		try {
			for(LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
				if("Nimbus".equals(info.getName())) {
					UIManager.setLookAndFeel(info.getClassName());
					break;
				}
			}
		} catch (Exception ex) {
			System.err.println("Set LookAndFeel: " + ex);
		}
	}

	public static void main (String[] args) {
		final Client c = new Client();
		EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {			
				ClientLogin loginFrame = new ClientLogin(c.connection);
				loginFrame.setVisible(true);
			}
		});
	}
}
